/* eslint-disable */
// @ts-ignore
import { queryOptions, useMutation } from '@tanstack/vue-query';
import type { DefaultError } from '@tanstack/vue-query';
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as apis from './pcController';
import * as API from './types';

/** 文章详情 GET /api/pc/articleDetail */
export function articleDetailUsingGetQueryOptions(options: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.articleDetailUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.articleDetailUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['articleDetailUsingGet', options],
  });
}

/** 公共配置 GET /api/pc/config */
export function getConfigUsingGetQueryOptions(options: {
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.getConfigUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['getConfigUsingGet', options],
  });
}

/** 主页数据 GET /api/pc/index */
export function indexUsingGet1QueryOptions(options: {
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.indexUsingGet1(queryKey[1] as typeof options);
    },
    queryKey: ['indexUsingGet1', options],
  });
}

/** 资讯中心 GET /api/pc/infoCenter */
export function infoCenterUsingGetQueryOptions(options: {
  options?: CustomRequestOptions;
}) {
  return queryOptions({
    queryFn: async ({ queryKey }) => {
      return apis.infoCenterUsingGet(queryKey[1] as typeof options);
    },
    queryKey: ['infoCenterUsingGet', options],
  });
}
